const http=require('http');

const fs=require("fs");
const server=http.createServer(function(request,response){
    console.log(request.url);
    response.setHeader("Content-Type", "text/html;charset=utf-8");
    let data=fs.readFileSync("./template/home.html");

    // response.write("1");
    // response.write("2");
    // response.write("3");
    // response.write("4");
    response.end(data);

});
server.listen(3000,function(){
    console.log("服务器启动成功，运行 localhost：3000");    

})